
// 数据库连接文件
const mongoose = require('mongoose')

const url = "mongodb://localhost:27017/jdf-myun"

module.exports = () => {
    mongoose.connect( url, { useUnifiedTopology: true, useNewUrlParser: true } )
    .then(() => {
        console.log('数据库连接成功>>>>>>>>>>>>>>>>>>>>>>>');
    })
    .catch(err => {
        console.log('数据库连接失败<<<<<<<<<<<<<<<<<<<<<<<', err);
    })
}

